import { WORD_REGEX } from "./defines";

export function toCamelLike(s: string): string {
    return s
        .replace(WORD_REGEX, m => `_${m}`)
        .toLowerCase()
        .replace(/[-_\s]+([a-z])/g, (_all, ch) => ch.toUpperCase());
}
